1
general::
The head or brain, as in He's not all there in the upper story. This expression transfers the literal sense of a higher floor in a multistory building to the top portion of the human body. Richard Bentley used it in A Dissertation on the Epistles of Phalaris (1699), where he compares a man with "brains . . . in his head" to a man who has "furniture in his upper story."
American Heritage Idioms